import _fetch from '@/api/request.js'

// 获取用户信息接口
function getUserInfoApi(data) {
    return _fetch({
        url: '/user/list',
        method: 'get',
        params: data
    })
}
//新增用户接口
function addUser(data) {
    return _fetch({
        url: '/user/add',
        method: 'POST',
        data: data
    })
}
//设置用户状态
function setUserStatus(data) {
    return _fetch({
        url: "/user/status",
        method: 'POST',
        data: data
    })
}
//删除用户
function deleteUserApi(data) {
    return _fetch({
        url: "/user/remove",
        method: 'POST',
        data: data
    })
}

//编辑用户信息接口
function editUserApi(data) {
    return _fetch({
        url: "/user/edit",
        method: "POST",
        data: data
    })
}

export { getUserInfoApi, addUser, setUserStatus, deleteUserApi, editUserApi }